{{extend 'layout.html'}}

<div class="ui-body ui-body-c ui-corner-all">
  <h1>{{=page.title}}</h1>
  {{include 'default/link_movie.html'}}
  <h2>({{=len(files)}} files, {{=bytes(sum(f.size for f in files))}})</h2>
  <a rel="external" data-inline="true" data-role="button" href="{{=URL('root',args=request.args[:-1])}}">folder</a>
  <a rel="external" data-inline="true" data-role="button" href="http://code.google.com/p/qcdutils/">download tool</a>
  {{if auth.user:}}
  <a rel="external" data-inline="true" data-role="button" href="{{=url}}">download link</a>
  {{for k,link in enumerate(links):}}
  <a rel="external" data-inline="true" data-role="button" href="{{=link}}">F{{=k}}</a>
  {{pass}}
  {{pass}}
  <br/>
  (Warning: the files are on tape and it may take some time to retrieve a file when you click on a link below. We suggest you use the script above instead.)
</div>

<ul data-role="listview" data-inset="true">
  <li data-role='list-divider'>Files in folder</li>
  {{for file in files:}}
  <li><a rel="external" href="{{=getfile(file.filename) if auth.user else URL('user/login',vars=dict(_next=URL(args=request.args)))}}">{{=name(file.filename)}} ({{=file.mtime.strftime('%Y-%b-%d')}}, {{=bytes(file.size)}})</a></li>
  {{pass}}
</ul>
